package com.oliet.entity.base;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author jiaZhenpeng
 * @Title: BaseEntity
 * @Package com.oliet.entity.base
 * @Description:
 * @date 2023-11-26 16:22
 */
@Data
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 版本
     */
    @TableField(fill = FieldFill.INSERT)
    @Version
    private Integer version;

    /**
     * 编码
     */
    @TableField(fill = FieldFill.INSERT)
    private String code;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date dateCreated;

    /**
     * 创建人CODE
     */
    @TableField(fill = FieldFill.INSERT)
    private String createdByCode;

    /**
     * 创建人NAME
     */
    @TableField(fill = FieldFill.INSERT)
    private String createdByName;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date lastUpdated;

    /**
     * 修改人CODE
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String modifiedByCode;

    /**
     * 修改人NAME
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String modifiedByName;

    /**
     * 是否删除 0-未删除  1-删除
     */
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Boolean isDeleted;

}
